################# PARAMETERS
param N;	# number of the agents (households)
param G;	# cost of the good
param k;	
param alpha{1..10}>=0, <=1; # MRS
param y{1..10}>=0; # endowment
################# VARIABLES
var x{1..N} >=0;	# contribution/tax
var u{1..N};		# utility
var e{1..N};		# utility improvement
var c{1..N} >=0;	# private constumption
var z{1..N};	
var Pk{1..N} >=0;	
var r;
var Pg >= 1, <=1;
################# CONSTRAINTS
subject to util {i in 1..N}:
	u[i] = c[i] + alpha[i] * Pg * G;
subject to provide_good:
	sum{i in 1..N} x[i] = Pg * G;
subject to budgets {i in 1..N}:
	y[i] = x[i] + c[i];
subject to aux1 {i in 1..N}:
	z[i] <= e[i];
subject to aux2 {i in 1..N}:
	z[i] <= r;
subject to peka:
	Pk[k] = (k-N)*r + sum{i in 1..N} z[i];
subject to ut_improv {i in 1..N}:
	e[i] = y[i] - x[i]*(1-alpha[i]);
################# OBJECTIVE
maximize pekaasterisk:
	Pk[k];
